package com.dongdongshop.data;

import java.io.Serializable;
import java.util.List;

/**
 * 分页工具类
 * @Author Eayon
 * @Date 2020/2/21 15:20
 */
public class Page<T> implements Serializable {
    private Integer pageNum;

    private Integer pageSize;

    private Long total;

    private List<T> rows;

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public Page() {
    }

    public Page(Integer pageNum, Integer pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public Page(Long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public Page(Integer pageNum, Integer pageSize, Long total, List<T> rows) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.total = total;
        this.rows = rows;
    }
}
